var crypto = require('crypto');

module.exports = {
    Md5: function (password) {
        const md5 = crypto.createHash('md5');
        return md5.update(password).digest('base64');
    },
    encryption: function (password) {
        const newpassword = this.Md5(this.Md5(password).sub(2, 7) + this.Md5(password));
        return newpassword
    }
};